package com.lujianfei.imagesearch.data;

import java.util.prefs.Preferences;

public class SPRepository {

	private Preferences pref = Preferences.userRoot().node(this.getClass().getName());

	private final String KEY_IMAGE_PATH = "image_path";
	private final String KEY_MNISTDATA_PATH = "mnist_data_path";
	private final String KEY_MNISTLABEL_PATH = "mnist_label_path";

	public void setImagePath(String imagePath) {
		pref.put(KEY_IMAGE_PATH, imagePath);
	}

	public String getImagePath() {
		return pref.get(KEY_IMAGE_PATH, ".");
	}

	public void setMnistDataPath(String mnistDataPath) {
		pref.put(KEY_MNISTDATA_PATH, mnistDataPath);
	}

	public String getMnistDataPath() {
		return pref.get(KEY_MNISTDATA_PATH, ".");
	}

	public void setMnistLabelPath(String mnistLabelPath) {
		pref.put(KEY_MNISTLABEL_PATH, mnistLabelPath);
	}

	public String getMnistLabelPath() {
		return pref.get(KEY_MNISTLABEL_PATH, ".");
	}
}
